package com.hugo.maomi_first;

import android.support.v4.app.Fragment;
import android.widget.RadioGroup;

import com.hugo.maomi_first.base.BaseActivity;
import com.hugo.maomi_first.home.view.HomeFragment;
import com.hugo.maomi_first.hot.HotFragment;
import com.hugo.maomi_first.user.UserFragment;
import com.hugo.maomi_first.utils.FragmentTabUtils;
import com.hugo.maomi_first.zhuanti.view.ZhuantiFragment;

import java.util.ArrayList;

import butterknife.Bind;


public class MainActivity extends BaseActivity {
    @Bind(R.id.main_rgs)
    RadioGroup rgs;

    @Override
    public int getLayoutId() {
        return R.layout.activity_drawer;
    }

    @Override
    public void initView() {
//        setSupportActionBar(mainToolbar);
        ArrayList<Fragment> fragments = new ArrayList<>();
        fragments.add(HomeFragment.newInstance());
        fragments.add(HotFragment.newInstance());
        fragments.add(ZhuantiFragment.newInstance());
        fragments.add(UserFragment.newInstance());
        new FragmentTabUtils(getSupportFragmentManager()
                , fragments
                , R.id.container_main
                , rgs)
        .setDefaultPostion(0);
//        mainToolbar.setOnClickListener(v -> {
//        });
    }
}
